





//
//  FadeDemo.m
//  WMZBanner
//
//  Created by wmz on 2020/6/17.
//  Copyright © 2020 wmz. All rights reserved.
//

#import "FadeDemo.h"
#import "WMZBannerView.h"
@interface FadeDemo ()

@end

@implementation FadeDemo

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    [self styleOne];
    [self styleTwo];
}


- (void)styleOne{
    WMZBannerParam *param =  BannerParam()
    .wFrameSet(CGRectMake(10,100, BannerWitdh-20, BannerHeight*0.25))
    .wItemSizeSet(CGSizeMake(BannerWitdh-20, BannerHeight*0.25))
    .wDataSet([self getData])
    //淡入淡出
    .wFadeOpenSet(YES)
    .wAutoScrollSet(YES)
    .wRepeatSet(YES)
    .wAutoScrollSecondSet(1.5)
    ;
    WMZBannerView *viewOne = [[WMZBannerView alloc]initConfigureWithModel:param];
    [self.view addSubview:viewOne];
}

- (void)styleTwo{
    WMZBannerParam *param =  BannerParam()
    .wFrameSet(CGRectMake(10,BannerHeight*0.25+150, BannerWitdh-20, BannerHeight*0.25))
    .wItemSizeSet(CGSizeMake(BannerWitdh-30, BannerHeight*0.25))
    .wDataSet([self getData])
    .wLineSpacingSet(5)
    .wHideBannerControlSet(YES)
    //淡入淡出
    .wFadeOpenSet(YES)
    //纵向
    .wVerticalSet(YES);
    WMZBannerView *viewOne = [[WMZBannerView alloc]initConfigureWithModel:param];
    [self.view addSubview:viewOne];
}

- (NSArray*)getData{
    return @[
      @"http://res1.eqh5.com/5572bd27-1766-4100-a549-2695ad6116e1.png",
      @"http://res1.eqh5.com/00f79722-a279-4256-966b-a1e20212a401.png",
      @"http://res1.eqh5.com/a8797ecd-bb42-49b6-8d7f-6f4bb9b9c7ed.png",
      @"http://res1.eqh5.com/7d054413-3c53-47e2-8dde-abf2a8b01711.png"
      ];
}

@end
